Prevent dragging groups into groups. Fixes #8706
[adiumx.git] / Plugins / Purple Service / PurpleMySpaceService.m
blobf3ebfa76605186043ec07962f635915df53c4b4e
1 //
2 //  PurpleMySpaceService.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 9/11/07.
6 //
8 #import "PurpleMySpaceService.h"
9 #import "PurpleMySpaceAccount.h"
10 #import "PurpleMySpaceAccountViewController.h"
11 #import <Adium/AIStatusControllerProtocol.h>
12 #import <AIUtilities/AIImageAdditions.h>
14 @implementation PurpleMySpaceService
16 //Account Creation
17 - (Class)accountClass{
18         return [PurpleMySpaceAccount class];
21 - (AIAccountViewController *)accountViewController{
22     return [PurpleMySpaceAccountViewController accountViewController];
25 - (DCJoinChatViewController *)joinChatView{
26         return nil;
29 //Service Description
30 - (NSString *)serviceCodeUniqueID{
31         return @"libpurple-MySpace";
33 - (NSString *)serviceID{
34         return @"MySpace";
36 - (NSString *)serviceClass{
37         return @"MySpace";
39 - (NSString *)shortDescription{
40         return @"MySpace";
42 - (NSString *)longDescription{
43         return @"MySpaceIM";
45 - (NSCharacterSet *)allowedCharacters{
46         return [NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789@._-"];
48 - (NSCharacterSet *)ignoredCharacters{
49         return [NSCharacterSet characterSetWithCharactersInString:@""];
51 - (int)allowedLength{
52         return 999;
54 - (BOOL)caseSensitive{
55         return NO;
57 - (AIServiceImportance)serviceImportance{
58         return AIServiceSecondary;
60 - (NSString *)userNameLabel{
61     return AILocalizedString(@"Email", "Used as a label for a username specified by email address");
63 - (NSString *)contactUserNameLabel{
64         return AILocalizedString(@"MySpace ID", "Label for the username for a MySpace contact");
66 - (void)registerStatuses{
67         [[adium statusController] registerStatus:STATUS_NAME_AVAILABLE
68                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
69                                                                           ofType:AIAvailableStatusType
70                                                                   forService:self];
71         
72         [[adium statusController] registerStatus:STATUS_NAME_AWAY
73                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
74                                                                           ofType:AIAwayStatusType
75                                                                   forService:self];
77         [[adium statusController] registerStatus:STATUS_NAME_INVISIBLE
78                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_INVISIBLE]
79                                                                           ofType:AIInvisibleStatusType
80                                                                   forService:self];
83 /*!
84  * @brief Default icon
85  *
86  * Service Icon packs should always include images for all the built-in Adium services.  This method allows external
87  * service plugins to specify an image which will be used when the service icon pack does not specify one.  It will
88  * also be useful if new services are added to Adium itself after a significant number of Service Icon packs exist
89  * which do not yet have an image for this service.  If the active Service Icon pack provides an image for this service,
90  * this method will not be called.
91  *
92  * The service should _not_ cache this icon internally; multiple calls should return unique NSImage objects.
93  *
94  * @param iconType The AIServiceIconType of the icon to return. This specifies the desired size of the icon.
95  * @return NSImage to use for this service by default
96  */
97 - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType
99         //If we're going to do it this way, we've got to return the small icon for both AIServiceIconSmall and the AIServiceIconList icons. 
100         return [NSImage imageNamed:((iconType == AIServiceIconSmall || iconType == AIServiceIconList) ? @"MySpace-small" : @"MySpace-large")
101                                           forClass:[self class] loadLazily:YES];
104 @end